home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
progjour
/
1991
/
06
/
alib
/
strcpy_l.asm
< prev
next >
Wrap
Assembly Source File
|
1991-06-25
|
437b
|
31 lines
include asm.inc
public strcpy_limit
.code
;; strcpy limit
;
; entry DS:SI source pointer
; ES:DI destination pointer
; DX destination limit
; exit DI updated to last character in destination
; uses AX
;
strcpy_limit proc
push si
scl1: cmp di,dx
jae scl2 ; if at destination limit
lodsb ; else copy one character
stosb
cmp al,0
jne scl1
dec di
scl2: pop si
ret
strcpy_limit endp
end